Invariant Based Programming Revisited

نویسنده

  • Ralph-Johan Back
چکیده

Program verification is usually done by adding specifications and invariants to the program and then proving that the verification conditions are all true. This makes program verification an alternative to or a complement to testing. We study here an another approach to program construction, which we refer to as invariant based programming, where we start by formulating the specifications and the internal loop invariants for the program, before we write the program code itself. The correctness of the code is then easy to check at the same time as one is constructing it. In this approach, program verification becomes a complement to coding rather than to testing. The purpose is to produce programs and software that are correct by construction. We present a new kind of diagrams, nested invariant diagrams, where program specifications and invariants (rather than the control) provide the main organizing structure. Invariants are described as sets and program code as transitions between the sets. Nesting of invariants provide an extension hierarchy that allows us to express the invariants in a very compact manner. We study the feasibility of formulating specifications and loop invariants before the code itself has been written in a number of case studies. We propose that a systematic use of figures, in combination with a rough idea of the intended behavior of the algorithm, makes it rather straightforward to formulate the invariants needed in the program. We discuss the correctness criteria for invariant based programs. Finally, we provide a complementary textual representation of invariant based programs which we refer to as situation analysis. This format is is roughly equivalent to nested invariant diagrams, but is better suited for carrying out proofs of the verification conditions .

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

SOLVING FUZZY LINEAR PROGRAMMING PROBLEMS WITH LINEAR MEMBERSHIP FUNCTIONS-REVISITED

Recently, Gasimov and Yenilmez proposed an approach for solving two kinds of fuzzy linear programming (FLP) problems. Through the approach, each FLP problem is first defuzzified into an equivalent crisp problem which is non-linear and even non-convex. Then, the crisp problem is solved by the use of the modified subgradient method. In this paper we will have another look at the earlier defuzzifi...

متن کامل

Complete Closest-Target Based Directional FDH Measures of Efficiency in DEA

In this paper, we aim to overcome three major shortcomings of the FDH (Free Disposal Hull) directional distance function through developing two new, named Linear and Fractional CDFDH, complete FDH measures of efficiency. To accomplish this, we integrate the concepts of similarity and FDH directional distance function. We prove that the proposed measures are translation invariant and unit invari...

متن کامل

SOLUTION-SET INVARIANT MATRICES AND VECTORS IN FUZZY RELATION INEQUALITIES BASED ON MAX-AGGREGATION FUNCTION COMPOSITION

Fuzzy relation inequalities based on max-F composition are discussed, where F is a binary aggregation on [0,1]. For a fixed fuzzy relation inequalities system $ A circ^{F}textbf{x}leqtextbf{b}$, we characterize all matrices $ A^{'} $ For which the solution set of the system $ A^{' } circ^{F}textbf{x}leqtextbf{b}$ is the same as the original solution set. Similarly, for a fixed matrix $ A $, the...

متن کامل

Communication Strategies Revisited: Looking beyond Interactional and Psycholinguistic Perspectives

Second language (L2) communication strategies (CSs) have traditionally been dealt with through either interactional or psychological perspectives. However, this paper is a critical attempt to question the status of the particular kinds of psycholinguistic and interactional approaches that currently dominate the field of second language acquisition (SLA). In this way, it expands the significance...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005